﻿@using Fyp.Models

@{
    Layout = "~/Shared/_layoutPage.cshtml";
    var PageTitle = "ViewList";
   
    var data = (List<Student>)ViewData["lst"];
}

@section title
{
 @PageTitle
}
<style>
table, td, th
{
border:1px solid green;
padding:2px;
}
th
{
background-color:green;
color:white;
padding:2px;
}
</style>
<div id="main" class = "background">
<strong>
            <div id="content"  style="margin-left: 98px;margin-bottom: -1px;">
                 <h2 style="text-align: center;">View Student</h2>
             </div>
    </strong>

    <table border="1" style="margin-left:117px; margin-bottom: 10px">
       <thead>
           <tr>
               
               <th class="table">Name</th>
               <th class="table">RollNo</th>
               <th class="table">Email</th>

               <th>Edit</th>
               <th> Delete</th>

           </tr>
       </thead>
       <tbody>
           @foreach(var row in data){
            <tr>
                   <td class="table">@row.Std_Name</td>
                   <td class="table">@row.Std_RegId</td>
                   <td class="table">@row.Std_Email</td>
                 <td>
            @Html.ActionLink("Edit", "Edit", new { id=row.SId }) 
            <td class="table"><a href='@Url.Action("Delete", "ReserveProject", new { Id = @row.SId})'><img src="~/Images/delete.png" title="Delete" style="margin-left: 3px;"/></a> </td>

        </tr>
           }
           </table>
    </div>